﻿Imports System
Imports System.ComponentModel
Imports System.ComponentModel.Design.Serialization
Imports System.Workflow.ComponentModel.Serialization

Namespace System.Workflow.ComponentModel
    <Browsable(True), DesignerSerializer(GetType(DependencyObjectCodeDomSerializer), GetType(CodeDomSerializer))> _
    Public NotInheritable Class WorkflowParameterBinding
        Inherits DependencyObject
        ' Methods
        Public Sub New()
        End Sub

        Public Sub New(ByVal parameterName As String)
            MyBase.SetValue(WorkflowParameterBinding.ParameterNameProperty, parameterName)
        End Sub


        ' Properties
        Public Property ParameterName As String
            Get
                Return CStr(MyBase.GetValue(WorkflowParameterBinding.ParameterNameProperty))
            End Get
            Set(ByVal value As String)
                MyBase.SetValue(WorkflowParameterBinding.ParameterNameProperty, value)
            End Set
        End Property

        <DefaultValue(CStr(Nothing))> _
        Public Property Value As Object
            Get
                Return MyBase.GetValue(WorkflowParameterBinding.ValueProperty)
            End Get
            Set(ByVal value As Object)
                MyBase.SetValue(WorkflowParameterBinding.ValueProperty, value)
            End Set
        End Property


        ' Fields
        Public Shared ReadOnly ParameterNameProperty As DependencyProperty = DependencyProperty.Register("ParameterName", GetType(String), GetType(WorkflowParameterBinding), New PropertyMetadata(DependencyPropertyOptions.Metadata))
        Public Shared ReadOnly ValueProperty As DependencyProperty = DependencyProperty.Register("Value", GetType(Object), GetType(WorkflowParameterBinding))
    End Class
End Namespace

